package com.taa.domain.trade.adapter.repository;

import com.taa.domain.trade.model.entity.OrderEntity;
import com.taa.domain.trade.model.entity.ProductEntity;
import com.taa.domain.trade.model.entity.UserEntity;
import com.taa.domain.trade.service.login.UserService;
import org.apache.catalina.User;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author: taa
 * @Desc: 交易仓储接口
 * @create: 2025-06-01 19:08
 **/
public interface ITradeRepository {


    int queryUserStatus(String userName);

    int queryStockByProductId(Long productId);

    void fillProductStrategy(List<ProductEntity> productEntityList);

    boolean reduceStock(List<Long> productIdList);

    boolean updateStock(List<Long> productIdList);

    OrderEntity generateOrder(String userName, List<ProductEntity> productEntityList, BigDecimal totalOriginalPrice, BigDecimal totalDiscountPrice);

    List<ProductEntity> listProducts();
    
    UserEntity queryUserByUserName(String userName);

    List<OrderEntity> queryOrderByUserName(String userName);    
}
